package com.joshua.spring.entity.form;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.joshua.spring.entity.em.AuthTypeEnum;
import lombok.Data;

/**
 * com.joshua.spring.business.entity.param -- OauthTokenParam
 * description:
 *
 * @author <a href="mailto:joshualwork@163.com">joshua_liu</a>
 * @date 2020/1/2 19:52
 */
@Data
public class OauthTokenParam {

    private String username;
    private String email;
    private String phone;
    private String verifyCode;
    private String password;
    private AuthTypeEnum authType;
    @JsonProperty(value = "grant_type", access = JsonProperty.Access.READ_WRITE)
    private String grantType;
    @JsonProperty(value = "client_id", access = JsonProperty.Access.READ_WRITE)
    private String clientId;
    @JsonProperty(value = "client_secret", access = JsonProperty.Access.READ_WRITE)
    private String clientSecret;
    @JsonProperty(value = "refresh_token", access = JsonProperty.Access.READ_WRITE)
    private String refreshToken;
//    @JsonProperty(value = "grant_type", access = JsonProperty.Access.READ_WRITE)
//    private String grant_type;
//    @JsonProperty(value = "client_id", access = JsonProperty.Access.READ_WRITE)
//    private String client_id;
//    @JsonProperty(value = "client_secret", access = JsonProperty.Access.READ_WRITE)
//    private String client_secret;
//    @JsonProperty(value = "refresh_token", access = JsonProperty.Access.READ_WRITE)
//    private String refresh_token;

    public OauthTokenParam clientId(String clientId) {
        this.clientId = clientId;
        return this;
    }

    public OauthTokenParam grantType(String grantType) {
        this.grantType = grantType;
        return this;
    }

    public OauthTokenParam clientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
        return this;
    }

    public static OauthTokenParam builder() {
        return new OauthTokenParam();
    }
}
